package com.learner.course.controller.api;

import com.learner.course.service.CourseMarketService;
import com.learner.pojo.course.CourseMarket;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ice2020x
 * @date 2022-01-28 1:31
 * @description:
 */
@RestController
@RequestMapping("/api/edu/course")
public class ApiCourseMarketController {

    @Autowired
    CourseMarketService courseMarketService;

    /**
     * 根据id查看课程营销
     *
     * @param courseId 课程id
     * @return 结果
     */
    @GetMapping("/course_market/get/{id}")
    public CourseMarket getCourseMarketById(@PathVariable("id") String courseId) {
        return courseMarketService.getCourseMarketById(courseId);
    }
}
